<?php

$s_UserID    = '';
$s_UserSaint = '';
$s_UserName  = '';
$s_UserType  = '';
$s_UserCrew  = '';
$s_ClassID   = '';
$s_Team      = '';
$s_Level     = '';
$s_Crew      = '';
$s_Course    = '';

if (isset($_SESSION['userid'    ] )) { $s_UserID    = $_SESSION['userid'    ]; }
if (isset($_SESSION['saint'     ] )) { $s_UserSaint = $_SESSION['saint'     ]; }
if (isset($_SESSION['username'  ] )) { $s_UserName  = $_SESSION['username'  ]; }
if (isset($_SESSION['usertype'  ] )) { $s_UserType  = $_SESSION['usertype'  ]; }
if (isset($_SESSION['usercrew'  ] )) { $s_UserCrew  = $_SESSION['usercrew'  ]; }
if (isset($_SESSION['classid'   ] )) { $s_ClassID   = $_SESSION['classid'   ]; }
if (isset($_SESSION['team'      ] )) { $s_Team      = $_SESSION['team'      ]; }
if (isset($_SESSION['level'     ] )) { $s_Level     = $_SESSION['level'     ]; }
if (isset($_SESSION['crew'      ] )) { $s_Crew      = $_SESSION['crew'      ]; }
if (isset($_SESSION['course'    ] )) { $s_Course    = $_SESSION['course'    ]; }

if($s_PPO_ModuleID == 'login_execute') {
    include 'lib_login_execute.php';
	exit;
}
if($s_PPO_ModuleID == 'logout_execute') {
    include 'lib_logout_execute.php';
	exit;
}
if ($s_UserID == '') {
    
    $f_returnurl = str_replace('?','&',$_SERVER['REQUEST_URI']);
    $_SESSION['returnurl'] = $_SERVER['REQUEST_URI'];
    
    include 'lib_login_form.php';
	exit;
}
?>
